home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
HENSA
/
COMMS
/
SERIAL_2_PARALELL.ARC
/
!S2P
/
!Help
next >
Wrap
Text File
|
1995-11-07
|
10KB
|
278 lines
Instructions for !S2P by Andrew Sellors
*****************************************************************************
* NOTE: *
* !S2P is FreeWare. *
* This means that you may freely copy and distribute it, provided that it *
* is complete with all original files, and that you do not sell it. *
* PD libraries may charge a nominal fee for the cost of duplication, *
* postage etc. *
* In no circumstances shall the author be liable for any damage, loss of *
* profits, time or data or any indirect or consequential loss rising out of *
* the use of this software or inability to use this software. *
*****************************************************************************
Contents:
---------
Aims
Features
Before you start!
Compatibility
Problems
Operation
Clicking on iconbar icon
Iconbar menu
"Serial To Parallel Configuration" window
Buffers
Setting the 3D bit
Serial Lead Wiring
Contacting the author
********************************************************************************
Aims:
-----
This program sends all data received by a serial port to the parallel port.
Why????
I have two machines, but only one printer and the two machines are not close
together (10 metres in fact). Both machines are connected together using the
serial ports so by configuring !Printers to use the serial port and running
this program on the other machine, I can print from the remote machine.
Another use for the program is to enable the Acorn Pocketbook (or Psion
equivalent) to print on a parallel printer by connecting its serial port to
the desktop machine and running this program.
********************************************************************************
Features:
---------
Uses 3D bit in CMOS RAM to select 2D or 3D windows _and_ iconsprites on startup.
(See the "Setting the 3D bit" section if you don't like 2D windows)
Uses Block Drivers so it can use serial ports other than the internal one.
Provides full control over the serial port used.
Has the option of mapping the printer data so that a TurboDriver printer cable
can be used.
********************************************************************************
Before you start!:
------------------
Before you can use this program you need the Block Drivers by Hugo Fiennes.
If you don't have them then download them now! or look at your favourite
PD library.
********************************************************************************
Compatibility:
--------------
This program is for RISC OS 3.10 or later.
It has been tested on both RISC OS 3.10 and RISC OS 3.50 and with the internal
port using Block Drivers v10a.
********************************************************************************
Problems:
---------
There is a problem with the support of the internal serial port on 'old'
hardware machines (pre A5000) in RISC OS 3.10, which was fixed in 3.11.
Using version 0.21 of the Serial Device Driver for the internal serial port
results in reception at high data rates being very unreliable, with many
characters being lost. For this reason, I have included a small BASIC program,
PatchSDD, which is run when !S2P is started. This updates v0.21 of the Serial
Device Driver to v0.22 and so cures the problems. It checks the version number
so it will only alter v0.21, if you are already loading v0.22 as part of your
boot sequence then no changes are made.
********************************************************************************
Operation:
----------
When the !S2P icon is double-clicked, Serial 2 Parallel installs itself on the
left of the icon bar and the configured Block Driver loaded. If the !SerialDev
application that holds the Block Drivers has not been seen by the Filer then
an error is reported and the program does not start up.
********************************************************************************
Clicking on iconbar icon:
-------------------------
The colour of the printer on the icon indicates whether the serial port is
being redirected to the parallel port:
Grey printer: Serial port not redirected
Yellow printer: Serial port being redirected
Clicking on the icon toggles this state.
********************************************************************************
Iconbar menu:
-------------
+--------------+
| S2P |
+--------------+
| Info ⇨ | ⇨ opens "About this program" window
| Configure... | Opens "Serial To Parallel Configuration" window
| Quit | Quits program.
+--------------+
********************************************************************************
"Serial To Parallel Configuration" window:
-----------------------------------
This allows the serial and parallel ports so be set up.
Any changes made only take effect when either "Change" or "Save" are selected.
The "Driver Name" pop-up menu allows you to change the Block Driver used.
When a new driver is selected, the driver is scanned to find the baud rates
and ports supported, and the relevant menus changed accordingly.
Clicking on "Rescan Drivers" rechecks the available Block Drivers and updates
the list of drivers for the "Driver Name" menu. This can be used to update
the list if any drivers have been added since the program was started.
The "Port Number" pop-up menu allows the serial port to be configured as
some drivers support more than one serial port, the internal driver has only
one port: 0.
The other menus are fairly self explanatory, these should be set to the same
as !Printers for the transfer of data to work.
Turning on the "TurboDriver Cable" option allows S2P to be used when special
cable for the CC TurboDrivers is being used. If you have a normal cable and
select this option then the printer will print garbage.
Clicking on "Change" makes any changes made take effect and removes the window
from the screen. If adjust is used instead of select then the window is left
on screen.
Clicking on "Cancel" throws away any changes made and removes the window from
the screen.
Clicking on "Save" makes any changes made take effect and the saves the
configuration to disc to be used the next time the program is loaded. Whether
the serial port is being redirected is also saved with the options in this
window. If adjust is used instead of select then the window is left on screen.
********************************************************************************
Buffers:
--------
Increasing the size of the serial input buffer and printer buffer will improve
the speed at which data is transferred and so reduce printing time.
The size of the printer buffer is shown by:
*Status PrinterBufferSize
I recommend a size of at least 1 page of memory which is achieved by
*Configure PrinterBufferSize 1
This will allocate 8, 16, or 32K of memory depending on whether you have 1, 2 or
4Mb in your machine.
Increasing the size of the serial input buffer also helps as the normal buffer
is very small, only 255 bytes and it is only allowed to fill to 155 with the
Block Drivers. This can be done by loading a module such as SerialBuff by
David Pilling.
********************************************************************************
Setting the 3D bit:
-------------------
If you want to use the 3D windows in this program (and the handful of others
that support it) then you need to set the 3D bit in the CMOS RAM. In RISC OS 3.1
there is no *configure command to change it.
Cut out the following BASIC program and run it.
Note: this program toggles the bit, so if its off and you run it twice then
it is still off!
10REM Toggle state of '3D look' bit in CMOS
20REM Read byte
30SYS "OS_Byte",161,140 TO ,,byte%
40REM EOR byte with mask for bit 0
50byte% = byte% EOR 1
60REM Write byte back again
70SYS "OS_Byte",162,140,byte%
80END
OR
If you have RISC OS 3.5+ then it will probably be on, otherwise you will
have to then turn off "2D window tools" in the "Window Manager" part of
!Configure.
********************************************************************************
Serial Lead Wiring:
--------------------
This lead wiring is the one I use to connect the machines using the internal
ports so I know it works!! It takes account of the strange serial port the older
hardware machines have and should me used with the "Internal" driver rather than
the "InternalPC" driver.
Machine 1 Machine 2
+---1---DCD DCD---1---+
| |
| 2---RxD------------------------TxD---3 |
| |
| 3---TxD------------------------RxD---2 |
| |
+---4---DTR DTR---4---+
| |
| 5---0v--------------------------0v---5 |
| |
| 6---DSR------------------------RTS---7 |
| |
| 7---RTS------------------------DSR---6 |
| |
+---8---CTS CTS---8---+
9---RI RI---9
Note: that on both connectors, pins 1, 4 and 8 are connected together.
********************************************************************************
Contacting the author
--------------------
I, Andrew Sellors, can be contacted either at
57 Boundaries Road
Feltham
Middlesex
TW13 5DR
England
Or via Internet email at
asellors@orac2.demon.co.uk
Any feedback from users (bugs reports, requests for new features, praise,
money etc.) is gladly received.